<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        day = 6;
        switch (day) {
            case 0:
                console.log("今天星期1");
                break;
            case 1:
                console.log("今天星期2");
                break;
            case 2:
                console.log("今天星期3");
                break;
            case 3:
                console.log("今天星期4");
                break;
            case 4:
                console.log("今天星期5");
                break;
            case 5:
                console.log("今天星期6");
                break;
            default:
                console.log("今天星期日")
        }

        var x = 1;

        switch (x) {
            case 1:
                console.log('x 等于1');
            case 2:
                console.log('x 等于2');
            default:
                console.log('x 等于其他值');
        }


    </script>
</body>

</html>